<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2021/12/7
 * Time: 10:43
 */
require_once "userTool.php";

if(!empty($_COOKIE["userId"])){
    $key = $_COOKIE["userId"];

    session_start();
    if(!isset($_SESSION[$key])){
        echo "数据异常";
        die;
    }

    $username = checkAnswer($_SESSION[$key]);
    echo "欢迎登陆！".$username."<br><a href='order.php'>订单中心</a>";
}